{% extends "base.html" %}

{% block head_title %}Construct Detail - {{ object }}{% endblock %}
{% block title %}Construct Detail - {{ object }}{% endblock %}
{% block content %}
<div id= "summary" class="grid_6 alpha">
<table>
 <thead>
 </thead>
 <tdata>
  <tr><th>Construct</th><td>{{ object.construct }}</td></tr>
  <tr><th>Plasmid</th><td>{{ object.plasmid }}</td></tr>
  <tr><th>Source</th><td>{{ object.source }}</td></tr>
  <tr><th>Location</th><td>{{ object.location }}</td></tr>
  <tr><th>Selection</th><td>{{ object.selection }}</td></tr>
  <tr><th>Box</th><td>{{ object.box }}</td></tr>
  <tr><th>Notes</th><td>{{ object.notes }}</td></tr>
  </tdata>
 </table>
{% if perms.reagents.change_construct %}<p>To update construct details click <a href="{% url construct-edit object.id %}"><img src="/static/img/icons/Document Write.png" width=25 alt="edit"></a></p>{% endif %}
 </div>
<div = "sequencing" class="grid_6 omega">
{% if object.sequencing_set.all %}
<h2>Sequencing Results:</h2>
<table>
	<thead>
	<tr>
		<th>Date</th>
		<th>Primer</th>
		<th>File</th>
		<th>Notes</th>
	</tr>
	</thead>
	<tdata>
{% for sequencing in object.sequencing_set.all %}
	<tr>
		<td>{{sequencing.date}}</td>
		<td>{{sequencing.primer}}</td>
		<td><a href="/{{sequencing.file.url}}">Chromatogram</a></td>
		<td>{{sequencing.notes}}</td>
	</tr>
{% endfor %}
	</tdata>
</table>
<ul>
{% if object.sequencing_contig %}<li><a href="{{object.sequencing_contig.url}}">Assembled Sequence File</a></li>{% endif %}
{% if object.sequenced_object %}<li><a href="{{object.sequenced_object.url}}">Assembled Plasmid</a></li>{% endif %}
{% endif %}
</div>

<div = "mutagenesis and cloning" class="grid_6 omega">
<h2>Mutagenesis</h2>
<table>
<th>Used as Template</th><th>Generated By</th>
<tr>
	<td><ul>{% for mutagenesis in object.template.all %}<li><a href="/{{mutagenesis.get_absolute_url}}" title="{{ mutagenesis }}">{{ mutagenesis }}</li>{% endfor%}</ul></td>
	<td><ul>{% for mutagenesis in object.mutant.all %}<li><a href="/{{mutagenesis.get_absolute_url}}" title="{{ mutagenesis }}">{{ mutagenesis }}</li>{% endfor%}</ul></td>
</tr>
</table>
<h2>Cloning</h2>
<ul>
{% for cloning in object.cloning_set.all %}
<li><a href="/{{cloning.get_absolute_url}}" title="{{ cloning }}">{{ cloning }}</li>
{% endfor %}
</ul>
</div>

<div = "sharing" class="grid_6 omega">
{% if object.constructshipment_set.all %}
<h2>Shipments</h2>
<ul>
{% for shared in object.constructshipment_set.all %}
<li>{{ shared.ship_date }} to {{ shared.recipient }}</li>
{% endfor %}
</ul>
{% endif %}
</div>
<div = "experiments" class="grid_6 alpha">
{% with object.experiment_set.all as experiment_list %}
{% include "experiment_list_table.html" %}
{% endwith %}
</div>
{% include "comment.html" %}
{% endblock %}
